<html>
<head>
<title>Docs For Class QueryTemplatesPhpQuery</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">QueryTemplates</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                    
                                                  		  [ <a href="../classtrees_QueryTemplates.html" class="menu">class tree: QueryTemplates</a> ]
		  [ <a href="../elementindex_QueryTemplates.html" class="menu">index: QueryTemplates</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_QueryTemplates.html">QueryTemplates</a><br />
              <a href="../li_phpQuery.html">phpQuery</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---IQueryTemplatesParse.php.html">		IQueryTemplatesParse.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---IQueryTemplatesTemplate.php.html">		IQueryTemplatesTemplate.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplates.php.html">		QueryTemplates.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesParse.php.html">		QueryTemplatesParse.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesPhpQuery.php.html">		QueryTemplatesPhpQuery.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSource.php.html">		QueryTemplatesSource.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesSourceQuery.php.html">		QueryTemplatesSourceQuery.php
		</a><br>
			<a href="../QueryTemplates/_home---bob---workspace---QueryTemplates---src---QueryTemplatesTemplate.php.html">		QueryTemplatesTemplate.php
		</a><br>
	  </div><br />
      
            <b>Interfaces:</b><br />
        <div class="package">
		    		<a href="../QueryTemplates/IQueryTemplatesParse.html">IQueryTemplatesParse</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesParseChain.html">IQueryTemplatesParseChain</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplate.html">IQueryTemplatesTemplate</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplateChain.html">IQueryTemplatesTemplateChain</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplateParse.html">IQueryTemplatesTemplateParse</a><br />
	    		<a href="../QueryTemplates/IQueryTemplatesTemplateSources.html">IQueryTemplatesTemplateSources</a><br />
	  </div>
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../QueryTemplates/QueryTemplates.html">QueryTemplates</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSource.html">QueryTemplatesSource</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesSourceQuery.html">QueryTemplatesSourceQuery</a><br />
	    		<a href="../QueryTemplates/QueryTemplatesTemplate.html">QueryTemplatesTemplate</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: QueryTemplatesPhpQuery</h1>
Source Location: /home/bob/workspace/QueryTemplates/src/QueryTemplatesPhpQuery.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre><a href="../phpQuery/phpQueryObject.html">phpQueryObject</a>
   |
   --QueryTemplatesPhpQuery</pre><br />
<div class="description">Class extending phpQueryObject with templating methods.</div><br /><br />
<h4>Author(s):</h4>
<ul>
          <li>Tobiasz Cudnik &lt;<a href="mailto:tobiasz.cudnik/gmail.com">tobiasz.cudnik/gmail.com</a>&gt;</li>
                        </ul>




                

        
</td>



<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodattrAppend">attrAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodattrPrepend">attrPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">codeToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorAfter">codeToSelectorAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorAppend">codeToSelectorAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorAttr">codeToSelectorAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorBefore">codeToSelectorBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorPrepend">codeToSelectorPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorReplace">codeToSelectorReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStack">codeToStack</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackAfter">codeToStackAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackAppend">codeToStackAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackAttr">codeToStackAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackBefore">codeToStackBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackPrepend">codeToStackPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackReplace">codeToStackReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseIfNotVar">elseIfNotVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseIfPHP">elseIfPHP</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseIfVar">elseIfVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelsePHP">elsePHP</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseStatement">elseStatement</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodendOnly">endOnly</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodformFromVars">formFromVars</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodformFromVars_CodeValue">formFromVars_CodeValue</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifNotVar">ifNotVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifPHP">ifPHP</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifVar">ifVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodinputsFromValues">inputsFromValues</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodloop">loop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodloopOne">loopOne</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodloopSeparate">loopSeparate</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodonlyJS">onlyJS</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodonlyPHP">onlyPHP</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodsaveAsVar">saveAsVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodsaveTextAsVar">saveTextAsVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodstackToMethod">stackToMethod</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElseIfNotVar">tagToElseIfNotVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElseIfPHP">tagToElseIfPHP</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElseIfVar">tagToElseIfVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElsePHP">tagToElsePHP</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElseStatement">tagToElseStatement</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToIfNotVar">tagToIfNotVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToIfPHP">tagToIfPHP</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToIfVar">tagToIfVar</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodunWrap">unWrap</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">valuesToForm</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoop">valuesToLoop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoopFirst">valuesToLoopFirst</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoopSeparate">valuesToLoopSeparate</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">valuesToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorAfter">valuesToSelectorAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorAppend">valuesToSelectorAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorAttr">valuesToSelectorAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorBefore">valuesToSelectorBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorPrepend">valuesToSelectorPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorReplace">valuesToSelectorReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">valuesToStack</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackAfter">valuesToStackAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackAppend">valuesToStackAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackAttr">valuesToStackAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackBefore">valuesToStackBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackPrepend">valuesToStackPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackReplace">valuesToStackReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToVars">valuesToVars</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrint">varPrint</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintAfter">varPrintAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintAppend">varPrintAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintAttr">varPrintAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintBefore">varPrintBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintPrepend">varPrintPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintReplace">varPrintReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsFromStack">varsFromStack</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsFromStackText">varsFromStackText</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsFromValues">varsFromValues</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">varsToForm</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoop">varsToLoop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoopFirst">varsToLoopFirst</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoopSeparate">varsToLoopSeparate</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">varsToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorAfter">varsToSelectorAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorAppend">varsToSelectorAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorAttr">varsToSelectorAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorBefore">varsToSelectorBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorPrepend">varsToSelectorPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorReplace">varsToSelectorReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">varsToStack</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackAfter">varsToStackAfter</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackAppend">varsToStackAppend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackAttr">varsToStackAttr</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackBefore">varsToStackBefore</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackPrepend">varsToStackPrepend</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackReplace">varsToStackReplace</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_codeToSelector">_codeToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_codeToStack">_codeToStack</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_if">_if</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_tagToElse">_tagToElse</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_valuesToLoop">_valuesToLoop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_valuesToSelector">_valuesToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_valuesToStack">_valuesToStack</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_varPrint">_varPrint</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_varsParseFields">_varsParseFields</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_varsToLoop">_varsToLoop</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_varsToSelector">_varsToSelector</a></li>
    <li><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#method_varsToStack">_varsToStack</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>


<td valign="top">
<h3>Child classes:</h3>
<div class="tags">
<dl>
<dt><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a></dt>
	<dd>Template parsing class.</dd>
</dl>
</div>
</td>


<td valign="top">
<h3>Inherited Variables</h3>
<div class="tags">
<h4>Class: <a href="../phpQuery/phpQueryObject.html">phpQueryObject</a></h4>
<dl>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$charset">phpQueryObject::$charset</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$current">phpQueryObject::$current</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$document">phpQueryObject::$document</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$documentFragment">phpQueryObject::$documentFragment</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$documentID">phpQueryObject::$documentID</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$documentWrapper">phpQueryObject::$documentWrapper</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$elements">phpQueryObject::$elements</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$elementsBackup">phpQueryObject::$elementsBackup</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$elementsInterator">phpQueryObject::$elementsInterator</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$previous">phpQueryObject::$previous</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$root">phpQueryObject::$root</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$valid">phpQueryObject::$valid</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../phpQuery/phpQueryObject.html#var$xpath">phpQueryObject::$xpath</a>
  </dt>
<dd>
   
</dd>
</dl>
</div>
</td>

<td valign="top">
<h3>Inherited Methods</h3>
<div class="tags">
<h4>Class: <a href="../phpQuery/phpQueryObject.html">phpQueryObject</a></h4>
<dl>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__construct">phpQueryObject::__construct()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodadd">phpQueryObject::add()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodaddClass">phpQueryObject::addClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodaddClassPHP">phpQueryObject::addClassPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodafter">phpQueryObject::after()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodafterPHP">phpQueryObject::afterPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodancestors">phpQueryObject::ancestors()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodandSelf">phpQueryObject::andSelf()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodappend">phpQueryObject::append()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodappendPHP">phpQueryObject::appendPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodappendTo">phpQueryObject::appendTo()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodattr">phpQueryObject::attr()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodattrEvents">phpQueryObject::attrEvents()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodattrPHP">phpQueryObject::attrPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodbefore">phpQueryObject::before()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodbeforePHP">phpQueryObject::beforePHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodbind">phpQueryObject::bind()</a>
  </dt>
  <dd>
    Binds a handler to one or more events (like click) for each matched element.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodchange">phpQueryObject::change()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodchildren">phpQueryObject::children()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodclick">phpQueryObject::click()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcontents">phpQueryObject::contents()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcontentsUnwrap">phpQueryObject::contentsUnwrap()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcount">phpQueryObject::count()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcss">phpQueryObject::css()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodcurrent">phpQueryObject::current()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddebug">phpQueryObject::debug()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddocumentFragment">phpQueryObject::documentFragment()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddump">phpQueryObject::dump()</a>
  </dt>
  <dd>
    Dump htmlOuter and preserve chain. Usefull for debugging.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpDie">phpQueryObject::dumpDie()</a>
  </dt>
  <dd>
    Dump htmlOuter and stop script execution. Usefull for debugging.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpLength">phpQueryObject::dumpLength()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpTree">phpQueryObject::dumpTree()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methoddumpWhois">phpQueryObject::dumpWhois()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodeach">phpQueryObject::each()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodelementsContainsNode">phpQueryObject::elementsContainsNode()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodend">phpQueryObject::end()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodeq">phpQueryObject::eq()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodextend">phpQueryObject::extend()</a>
  </dt>
  <dd>
    Deprecated, use $pq-&gt;plugin() instead.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodfilter">phpQueryObject::filter()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodfilterCallback">phpQueryObject::filterCallback()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodfind">phpQueryObject::find()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodget">phpQueryObject::get()</a>
  </dt>
  <dd>
    Return matched DOM nodes.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDocument">phpQueryObject::getDocument()</a>
  </dt>
  <dd>
    Returns object with stack set to document root.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDocumentID">phpQueryObject::getDocumentID()</a>
  </dt>
  <dd>
    Get object's Document ID.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDocumentIDRef">phpQueryObject::getDocumentIDRef()</a>
  </dt>
  <dd>
    Saves object's DocumentID to $var by reference.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetDOMDocument">phpQueryObject::getDOMDocument()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetElementSiblings">phpQueryObject::getElementSiblings()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetNodeAttrs">phpQueryObject::getNodeAttrs()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetNodeXpath">phpQueryObject::getNodeXpath()</a>
  </dt>
  <dd>
    Returns node's XPath.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetString">phpQueryObject::getString()</a>
  </dt>
  <dd>
    Return matched DOM nodes.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodgetStrings">phpQueryObject::getStrings()</a>
  </dt>
  <dd>
    Return matched DOM nodes.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhasClass">phpQueryObject::hasClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhide">phpQueryObject::hide()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhtml">phpQueryObject::html()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodhtmlOuter">phpQueryObject::htmlOuter()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodindex">phpQueryObject::index()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodinsert">phpQueryObject::insert()</a>
  </dt>
  <dd>
    Internal insert method. Don't use it.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodinsertAfter">phpQueryObject::insertAfter()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodinsertBefore">phpQueryObject::insertBefore()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodis">phpQueryObject::is()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisChar">phpQueryObject::isChar()</a>
  </dt>
  <dd>
    Determines if $char is really a char.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisHTML">phpQueryObject::isHTML()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisRegexp">phpQueryObject::isRegexp()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisRoot">phpQueryObject::isRoot()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisXHTML">phpQueryObject::isXHTML()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodisXML">phpQueryObject::isXML()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodkey">phpQueryObject::key()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodlength">phpQueryObject::length()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodload">phpQueryObject::load()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmap">phpQueryObject::map()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkup">phpQueryObject::markup()</a>
  </dt>
  <dd>
    jQuey difference
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupEvents">phpQueryObject::markupEvents()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupOuter">phpQueryObject::markupOuter()</a>
  </dt>
  <dd>
    jQuey difference
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupOuterPHP">phpQueryObject::markupOuterPHP()</a>
  </dt>
  <dd>
    TODO doc
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmarkupPHP">phpQueryObject::markupPHP()</a>
  </dt>
  <dd>
    TODO doc
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmatchClasses">phpQueryObject::matchClasses()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodmerge">phpQueryObject::merge()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnewInstance">phpQueryObject::newInstance()</a>
  </dt>
  <dd>
    Returns new instance of actual class.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnext">phpQueryObject::next()</a>
  </dt>
  <dd>
    Double-function method.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnextAll">phpQueryObject::nextAll()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodnot">phpQueryObject::not()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetExists">phpQueryObject::offsetExists()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetGet">phpQueryObject::offsetGet()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetSet">phpQueryObject::offsetSet()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodoffsetUnset">phpQueryObject::offsetUnset()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodparent">phpQueryObject::parent()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodparents">phpQueryObject::parents()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodparseSelector">phpQueryObject::parseSelector()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodphp">phpQueryObject::php()</a>
  </dt>
  <dd>
    Just like html(), but returns markup with VALID (dangerous) PHP tags.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodplugin">phpQueryObject::plugin()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprepend">phpQueryObject::prepend()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprependPHP">phpQueryObject::prependPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprependTo">phpQueryObject::prependTo()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprev">phpQueryObject::prev()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodprevAll">phpQueryObject::prevAll()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodpseudoClasses">phpQueryObject::pseudoClasses()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodremove">phpQueryObject::remove()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodremoveAttr">phpQueryObject::removeAttr()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodremoveClass">phpQueryObject::removeClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreplaceAll">phpQueryObject::replaceAll()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreplaceWith">phpQueryObject::replaceWith()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreplaceWithPHP">phpQueryObject::replaceWithPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodreverse">phpQueryObject::reverse()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodrewind">phpQueryObject::rewind()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodrunQuery">phpQueryObject::runQuery()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodserialize">phpQueryObject::serialize()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodserializeArray">phpQueryObject::serializeArray()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodshow">phpQueryObject::show()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodsiblings">phpQueryObject::siblings()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodsize">phpQueryObject::size()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodslice">phpQueryObject::slice()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodstack">phpQueryObject::stack()</a>
  </dt>
  <dd>
    Internal stack iterator.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodstackIsRoot">phpQueryObject::stackIsRoot()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodsubmit">phpQueryObject::submit()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodswitchWith">phpQueryObject::switchWith()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtext">phpQueryObject::text()</a>
  </dt>
  <dd>
    Return joined text content.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtoggleClass">phpQueryObject::toggleClass()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtoReference">phpQueryObject::toReference()</a>
  </dt>
  <dd>
    Saves actual object to $var by reference.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtoRoot">phpQueryObject::toRoot()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtrigger">phpQueryObject::trigger()</a>
  </dt>
  <dd>
    Trigger a type of event on every matched element.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodtriggerHandler">phpQueryObject::triggerHandler()</a>
  </dt>
  <dd>
    This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodunbind">phpQueryObject::unbind()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodunloadDocument">phpQueryObject::unloadDocument()</a>
  </dt>
  <dd>
    Unloads whole document from memory.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodunQuote">phpQueryObject::unQuote()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodval">phpQueryObject::val()</a>
  </dt>
  <dd>
    Return form element value.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodvalid">phpQueryObject::valid()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwhois">phpQueryObject::whois()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrap">phpQueryObject::wrap()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapAll">phpQueryObject::wrapAll()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapAllOld">phpQueryObject::wrapAllOld()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapAllPHP">phpQueryObject::wrapAllPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapInner">phpQueryObject::wrapInner()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapInnerPHP">phpQueryObject::wrapInnerPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodwrapPHP">phpQueryObject::wrapPHP()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodxml">phpQueryObject::xml()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#methodxmlOuter">phpQueryObject::xmlOuter()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_clone">phpQueryObject::_clone()</a>
  </dt>
  <dd>
    Enter description here...
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_empty">phpQueryObject::_empty()</a>
  </dt>
  <dd>
    Proper name without underscore (just -&gt;empty()) also works.
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_next">phpQueryObject::_next()</a>
  </dt>
  <dd>
    Safe rename of next().
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method_prev">phpQueryObject::_prev()</a>
  </dt>
  <dd>
    Use prev() and next().
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__call">phpQueryObject::__call()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__get">phpQueryObject::__get()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__loadSuccess">phpQueryObject::__loadSuccess()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__pseudoClassParam">phpQueryObject::__pseudoClassParam()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method__toString">phpQueryObject::__toString()</a>
  </dt>
  <dd>
    
  </dd>
    <dt>
    <a href="../phpQuery/phpQueryObject.html#method___wrapAllCallback">phpQueryObject::___wrapAllCallback()</a>
  </dt>
  <dd>
    
  </dd>
  </dl>
</div>
</td>

</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line 11]<br />
Class extending phpQueryObject with templating methods.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>author:</b>&nbsp;&nbsp;</td><td>Tobiasz Cudnik &lt;<a href="mailto:tobiasz.cudnik/gmail.com">tobiasz.cudnik/gmail.com</a>&gt;</td>
  </tr>
  <tr>
    <td><b>link:</b>&nbsp;&nbsp;</td><td><a href="http://code.google.com/p/querytemplates/">http://code.google.com/p/querytemplates/</a></td>
  </tr>
  <tr>
    <td><b>abstract:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>license:</b>&nbsp;&nbsp;</td><td><a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a></td>
  </tr>
</table>
</div>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />


<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
  <hr />
	<a name="methodformFromVars_CodeValue"></a>
	<h3>static method formFromVars_CodeValue <span class="smalllinenumber">[line 4654]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>static void formFromVars_CodeValue(

$params)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$params</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>

  <hr />
	<a name="methodattrAppend"></a>
	<h3>method attrAppend <span class="smalllinenumber">[line 6300]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void attrAppend(

$attr, 
$value)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>attrAppend()</td>
  </tr>
  <tr>
    <td><b>todo:</b>&nbsp;&nbsp;</td><td>use attr() function (encoding issues etc)</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$value</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodattrPrepend"></a>
	<h3>method attrPrepend <span class="smalllinenumber">[line 6307]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void attrPrepend(

$attr, 
$value)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$value</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToSelector"></a>
	<h3>method codeToSelector <span class="smalllinenumber">[line 1820]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToSelector(
String
$codeArray, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code inside nodes matched by selector. Method uses  actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">codeToSelector</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$i</span><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-var">$i&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToSelectorAfter"></a>
	<h3>method codeToSelectorAfter <span class="smalllinenumber">[line 2141]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToSelectorAfter(
String
$codeArray, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code after nodes matched by selector. Method uses  actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorAfter">codeToSelectorAfter</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$i</span><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-var">$i&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToSelectorAppend"></a>
	<h3>method codeToSelectorAppend <span class="smalllinenumber">[line 1979]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToSelectorAppend(
String
$codeArray, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null], String
$attr)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code at the end of nodes matched by selector. Method  uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorAppend">codeToSelectorAppend</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$i</span><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-var">$i&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToSelectorAttr"></a>
	<h3>method codeToSelectorAttr <span class="smalllinenumber">[line 2302]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToSelectorAttr(
String
$attr, String
$codeArray, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code inside attribute of nodes matched by selector.<br /><br /><p>Method uses actually matched nodes as root for the query.</p><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorAttr">codeToSelectorAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&nbsp;rel='<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>'&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$i</span><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-var">$i&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToSelectorBefore"></a>
	<h3>method codeToSelectorBefore <span class="smalllinenumber">[line 2221]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToSelectorBefore(
String
$codeArray, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code before nodes matched by selector. Method uses  actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorBefore">codeToSelectorBefore</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$i</span><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-var">$i&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToSelectorPrepend"></a>
	<h3>method codeToSelectorPrepend <span class="smalllinenumber">[line 2059]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToSelectorPrepend(
String
$codeArray, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code at the beggining of nodes matched by selector.<br /><br /><p>Method uses actually matched nodes as root for the query.</p><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorPrepend">codeToSelectorPrepend</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$i</span><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-var">$i&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToSelectorReplace"></a>
	<h3>method codeToSelectorReplace <span class="smalllinenumber">[line 1896]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToSelectorReplace(
String
$codeArray, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code replacing nodes matched by selector. Method uses  actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelectorReplace">codeToSelectorReplace</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-num">2</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$i</span><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-var">$i&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToStack"></a>
	<h3>method codeToStack <span class="smalllinenumber">[line 2397]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToStack(
String
$codeArray, [
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code inside actually matched nodes.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStack">codeToStack</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">QueryTemplatesPhpQuery::codeToSelector()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $codeArray which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToStackAfter"></a>
	<h3>method codeToStackAfter <span class="smalllinenumber">[line 2704]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToStackAfter(
String
$codeArray, [
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code after actually matched nodes.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackAfter">codeToStackAfter</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">QueryTemplatesPhpQuery::codeToSelector()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $codeArray which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToStackAppend"></a>
	<h3>method codeToStackAppend <span class="smalllinenumber">[line 2550]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToStackAppend(
String
$codeArray, [
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code at the beggining of actually matched nodes.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackAppend">codeToStackAppend</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">QueryTemplatesPhpQuery::codeToSelector()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $codeArray which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToStackAttr"></a>
	<h3>method codeToStackAttr <span class="smalllinenumber">[line 2859]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToStackAttr(
String
$attr, String
$codeArray, [
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code inside attribute of actually matched nodes.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackAttr">codeToStackAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">QueryTemplatesPhpQuery::codeToSelector()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $codeArray which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToStackBefore"></a>
	<h3>method codeToStackBefore <span class="smalllinenumber">[line 2780]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToStackBefore(
String
$codeArray, [
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code before actually matched nodes.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackBefore">codeToStackBefore</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">QueryTemplatesPhpQuery::codeToSelector()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $codeArray which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToStackPrepend"></a>
	<h3>method codeToStackPrepend <span class="smalllinenumber">[line 2628]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToStackPrepend(
String
$codeArray, [
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code at the end of actually matched nodes.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackPrepend">codeToStackPrepend</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>print&nbsp;<span class="src-str">&quot;abba&quot;</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">QueryTemplatesPhpQuery::codeToSelector()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $codeArray which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcodeToStackReplace"></a>
	<h3>method codeToStackReplace <span class="smalllinenumber">[line 2473]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> codeToStackReplace(
String
$codeArray, [
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects raw executable code replacing actually matched nodes.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$code&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'print&nbsp;&quot;abba&quot;;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foreach(array(1,&nbsp;2,&nbsp;3)&nbsp;as&nbsp;$i)&nbsp;print&nbsp;$i'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToStackReplace">codeToStackReplace</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodcodeToSelector">QueryTemplatesPhpQuery::codeToSelector()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td>Array of raw code, where key is the field.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $codeArray which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodelseIfNotVar"></a>
	<h3>method elseIfNotVar <span class="smalllinenumber">[line 6139]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> elseIfNotVar(
string
$var, [bool
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Optional $separate parameter determines if selected elements should be  wrapped together or one-by-one. This is usefull when stack contains non-sibling  nodes.</p><p>Method doesn't change selected nodes stack.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseIfNotVar">elseIfNotVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;div&gt;2&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
          <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td>Determines if selected elements should be wrapped together or one-by-one</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodelseIfPHP"></a>
	<h3>method elseIfPHP <span class="smalllinenumber">[line 5969]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> elseIfPHP(
string
$code, [bool
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected tag with PHP &quot;else if&quot; statement containing $code as condition.<br /><br /><p>Optional $separate parameter determines if selected elements should be  wrapped together or one-by-one. This is usefull when stack contains non-sibling  nodes.</p><p>Method doesn't change selected nodes stack.</p><p>Example  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseIfPHP">elseIfPHP</a><span class="src-sym">(</span><span class="src-str">'$foo&nbsp;==&nbsp;1'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>Source  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>/&gt;</div></li>
</ol></p><p>Result  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$foo&nbsp;</span>==&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span>&lt;node1/&gt;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$code</b>&nbsp;&nbsp;</td>
        <td>Valid PHP condition code</td>
      </tr>
          <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td>Determines if selected elements should be wrapped together or one-by-one</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodelseIfVar"></a>
	<h3>method elseIfVar <span class="smalllinenumber">[line 6057]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> elseIfVar(
string
$var, [bool
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to true. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Optional $separate parameter determines if selected elements should be  wrapped together or one-by-one. This is usefull when stack contains non-sibling  nodes.</p><p>Method doesn't change selected nodes stack.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseIfVar">elseIfVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;div&gt;2&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
          <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td>Determines if selected elements should be wrapped together or one-by-one</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodelsePHP"></a>
	<h3>method elsePHP <span class="smalllinenumber">[line 6160]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> elsePHP(
[bool
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected tag with PHP &quot;else&quot; statement.<br /><br /><p>Optional $separate parameter determines if selected elements should be  wrapped together or one-by-one. This is usefull when stack contains non-sibling  nodes.</p><p>Method doesn't change selected nodes stack.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td>Determines if selected elements should be wrapped together or one-by-one</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodelseStatement"></a>
	<h3>method elseStatement <span class="smalllinenumber">[line 6222]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> elseStatement(
[$separate
$separate = false], [$lang
$lang = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		TODO description<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol></ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseStatement">elseStatement</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;div&gt;2&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$separate&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$lang&nbsp;&nbsp;</td>
        <td><b>$lang</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodendOnly"></a>
	<h3>method endOnly <span class="smalllinenumber">[line 6256]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void endOnly(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodformFromVars"></a>
	<h3>method formFromVars <span class="smalllinenumber">[line 4391]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> formFromVars(
$varNames
$varNames, $structure
$structure, [$defaults
$defaults = null], [$additionalData
$additionalData = null], [$template
$template = null], [$selectors
$selectors = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Method formFromVars acts as form helper. It creates the form without the<br /><br /><p>need of suppling a line of markup. Created form have following features: <ul><li>shows data from record (array or object)</li><li>shows errors</li><li>supports default values</li><li>supports radios and checkboxes</li><li>supports select elements with optgroups</li></ul></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>support callbacks (per input type, before/after, maybe for errors too ?)</td>
  </tr>
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>universalize language-specific injects</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$varNames&nbsp;&nbsp;</td>
        <td><b>$varNames</b>&nbsp;&nbsp;</td>
        <td>Array of names of following vars: <ul><li>record [0]
   Represents actual record as array of fields.</li><li>errors [1]
   Represents actual errors as array of fields. Field can also be an array.</li><li>additional data [2]
   Same purpose as $additionalData, but during template's execution.</li></ul> Names should be without dollar signs.  Ex:  <ol><li><div class="src-line">&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'row'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'errors.row'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'data'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$errors&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'one&nbsp;error'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'first&nbsp;error'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'second&nbsp;error'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></td>
      </tr>
          <tr>
        <td class="type">$structure&nbsp;&nbsp;</td>
        <td><b>$structure</b>&nbsp;&nbsp;</td>
        <td>Form structure information. This should be easily fetchable from ORM layer.  Possible types: <ul><li>text (default)</li><li>password</li><li>hidden</li><li>checkbox</li><li>radio</li><li>textarea</li></ul> Convention:  fieldName =&gt; array(    fieldType, {options}  )  Where {options} can be: <ul><li>label</li><li>id</li><li>multiple (only select)</li><li>optgroups (only select)</li><li>values (only radio)</li></ul> Ex:  <ol><li><div class="src-line">&nbsp;<span class="src-var">$structure&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;<span class="src-comm">//&nbsp;special&nbsp;field&nbsp;representing&nbsp;form&nbsp;element</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'__form'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'dasdas'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO&nbsp;fieldsets</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;array('Legend&nbsp;Label',&nbsp;array(</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'field1'&nbsp;=&gt;&nbsp;array('select',&nbsp;...),</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;),</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;),</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'select'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'optgroups'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'optgroup1'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'optgroup2'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'multiple'&nbsp;</span>=&gt;&nbsp;<span class="src-id">true</span><span class="src-sym">,&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;TODO</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'label'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Field&nbsp;Name'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field12'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'select'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'label'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'no&nbsp;optgroups'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field3'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'text'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'label'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Field3&nbsp;Label'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'someID'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field4'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;'text'&nbsp;is&nbsp;default</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'label'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Field4&nbsp;Label'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'id'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'someID2'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field5'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'hidden'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field6'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'radio'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'values'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'possibleValue1'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'possibleValue2'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field7'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'checkbox'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field234'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'textarea'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></td>
      </tr>
          <tr>
        <td class="type">$defaults&nbsp;&nbsp;</td>
        <td><b>$defaults</b>&nbsp;&nbsp;</td>
        <td>Default field's value. Used when field isn't present within supplied record.  Ex:  <ol><li><div class="src-line">&nbsp;<span class="src-var">$defaults&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'group2_1'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field234'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'lorem&nbsp;ipsum&nbsp;dolor&nbsp;sit&nbsp;sit&nbsp;sit...'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO&nbsp;multipe</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;&nbsp;'field2'&nbsp;=&gt;&nbsp;array('value2',&nbsp;'dadas',&nbsp;'fsdsf'),</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></td>
      </tr>
          <tr>
        <td class="type">$additionalData&nbsp;&nbsp;</td>
        <td><b>$additionalData</b>&nbsp;&nbsp;</td>
        <td>Additional data for fields. For now it's only used for populating select boxes.  Ex:  <ol><li><div class="src-line">&nbsp;<span class="src-var">$additionalData&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;optgroup</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Bar'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;optgroup</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'group2_1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'group2_1'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'group2_2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'group2_2'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'Bar'</span><span class="src-sym">,&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;no&nbsp;optgroup</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></td>
      </tr>
          <tr>
        <td class="type">$template&nbsp;&nbsp;</td>
        <td><b>$template</b>&nbsp;&nbsp;</td>
        <td>Input wrapper template.  TODO support per field templates.</td>
      </tr>
          <tr>
        <td class="type">$selectors&nbsp;&nbsp;</td>
        <td><b>$selectors</b>&nbsp;&nbsp;</td>
        <td>Array of selectors indexed by it's type. Allows to customize lookups inside  inputs wrapper. Possible values are: <ul><li>error (default: .errors)</li><li>label // TODO</li><li>input (per field) // TODO</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodifNotVar"></a>
	<h3>method ifNotVar <span class="smalllinenumber">[line 5927]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> ifNotVar(
string
$var, [bool
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Optional $separate parameter determines if selected elements should be  wrapped together or one-by-one. This is usefull when stack contains non-sibling  nodes.</p><p>Method doesn't change selected nodes stack.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifNotVar">ifNotVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;div&gt;2&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseStatement">QueryTemplatesPhpQuery::elseStatement()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
          <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td>Determines if selected elements should be wrapped together or one-by-one</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodifPHP"></a>
	<h3>method ifPHP <span class="smalllinenumber">[line 5749]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> ifPHP(
string
$code, [bool
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected tag with PHP &quot;if&quot; statement containing $code as condition.<br /><br /><p>Optional $separate parameter determines if selected elements should be  wrapped together or one-by-one. This is usefull when stack contains non-sibling  nodes.</p><p>Method doesn't change selected nodes stack.</p><p>Example  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><span class="src-id">tagToElseIf</span><span class="src-sym">(</span><span class="src-str">'$foo&nbsp;==&nbsp;1'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>Source  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>/&gt;</div></li>
</ol></p><p>Result  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$foo&nbsp;</span>==&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span>&lt;node1/&gt;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$code</b>&nbsp;&nbsp;</td>
        <td>Valid PHP condition code</td>
      </tr>
          <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td>Determines if selected elements should be wrapped together or one-by-one</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodifVar"></a>
	<h3>method ifVar <span class="smalllinenumber">[line 5842]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> ifVar(
string
$var, [bool
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to TRUE. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Optional $separate parameter determines if selected elements should be  wrapped together or one-by-one. This is usefull when stack contains non-sibling  nodes.</p><p>Method doesn't change selected nodes stack.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifVar">ifVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;div&gt;2&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodelseStatement">QueryTemplatesPhpQuery::elseStatement()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
          <tr>
        <td class="type">bool&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td>Determines if selected elements should be wrapped together or one-by-one</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodinputsFromValues"></a>
	<h3>method inputsFromValues <span class="smalllinenumber">[line 3962]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> inputsFromValues(
$data
$data, [$type
$type = 'hidden'])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Creates markup with INPUT tags and prepends it to form.<br /><br /><p>If selected element isn't a FORM then find('form') is executed.</p><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">form</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'was-here-before'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">form</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'bar'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodinputsFromValues">inputsFromValues</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">form</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'field1'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'foo'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'field2'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'bar'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'was-here-before'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">form</span>&gt;</div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td>QueryTemplatesPhpQuery::formFromValues()</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$data&nbsp;&nbsp;</td>
        <td><b>$data</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$type&nbsp;&nbsp;</td>
        <td><b>$type</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodloop"></a>
	<h3>method loop <span class="smalllinenumber">[line 3689]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type loop(
$varName
$varName, $asVarName
$asVarName, [$keyName
$keyName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>deprecated:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$asVarName&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$keyName&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodloopOne"></a>
	<h3>method loopOne <span class="smalllinenumber">[line 3679]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type loopOne(
$varName
$varName, $asVarName
$asVarName, [$keyName
$keyName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>deprecated:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$asVarName&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$keyName&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodloopSeparate"></a>
	<h3>method loopSeparate <span class="smalllinenumber">[line 3669]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type loopSeparate(
$varName
$varName, $asVarName
$asVarName, [$keyName
$keyName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>deprecated:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$asVarName&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$keyName&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodonlyJS"></a>
	<h3>method onlyJS <span class="smalllinenumber">[line 6252]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> onlyJS(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		TODO Move to jsCode plugin.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodonlyPHP"></a>
	<h3>method onlyPHP <span class="smalllinenumber">[line 6244]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> onlyPHP(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Honors code between onlyPHP and endOnly, only for PHP templates.<br /><br /><p>TODO: Is theres something wrong with this name ?</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsaveAsVar"></a>
	<h3>method saveAsVar <span class="smalllinenumber">[line 6275]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void saveAsVar(

$name)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$name</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsaveTextAsVar"></a>
	<h3>method saveTextAsVar <span class="smalllinenumber">[line 6278]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void saveTextAsVar(

$name)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$name</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodstackToMethod"></a>
	<h3>method stackToMethod <span class="smalllinenumber">[line 5266]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array stackToMethod(
[string
$method = 'markupOuter'])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Returns array being result of running $method on all stack elements.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$method</b>&nbsp;&nbsp;</td>
        <td>Method used for output.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToElseIfNotVar"></a>
	<h3>method tagToElseIfNotVar <span class="smalllinenumber">[line 5687]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> tagToElseIfNotVar(
string
$var)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Replaces selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Method doesn't change selected nodes stack.  detached from it's parent.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElseIfNotVar">tagToElseIfNotVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>2<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifVar">QueryTemplatesPhpQuery::ifVar()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToElseIfPHP"></a>
	<h3>method tagToElseIfPHP <span class="smalllinenumber">[line 5521]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> tagToElseIfPHP(
string
$code)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Replaces selected tag with PHP &quot;else if&quot; statement containing $code as condition.<br /><br /><p>Method doesn't change selected nodes stack.  detached from it's parent.</p><p>Example  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'.else-if'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElseIfPHP">tagToElseIfPHP</a><span class="src-sym">(</span><span class="src-str">'$foo&nbsp;==&nbsp;1'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>Source  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'else-if'</span>&gt;&lt;<span class="src-id">node1</span>/&gt;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>Result  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$foo&nbsp;</span>==&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span>&lt;node1/&gt;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$code</b>&nbsp;&nbsp;</td>
        <td>Valid PHP condition code</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToElseIfVar"></a>
	<h3>method tagToElseIfVar <span class="smalllinenumber">[line 5606]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> tagToElseIfVar(
string
$var)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Replaces selected tag with PHP &quot;else if&quot; statement checking if $var evaluates  to TRUE. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Method doesn't change selected nodes stack.  detached from it's parent.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToElseIfVar">tagToElseIfVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>2<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifVar">QueryTemplatesPhpQuery::ifVar()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToElsePHP"></a>
	<h3>method tagToElsePHP <span class="smalllinenumber">[line 5700]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void tagToElsePHP(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToElseStatement"></a>
	<h3>method tagToElseStatement <span class="smalllinenumber">[line 5697]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void tagToElseStatement(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToIfNotVar"></a>
	<h3>method tagToIfNotVar <span class="smalllinenumber">[line 5481]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> tagToIfNotVar(
string
$var)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Replaces selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to FALSE. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Method doesn't change selected nodes stack.  detached from it's parent.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToIfNotVar">tagToIfNotVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!&nbsp;</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>2<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifVar">QueryTemplatesPhpQuery::ifVar()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToIfPHP"></a>
	<h3>method tagToIfPHP <span class="smalllinenumber">[line 5315]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> tagToIfPHP(
string
$code)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Replaces selected tag with PHP &quot;if&quot; statement containing $code as condition.<br /><br /><p>Method doesn't change selected nodes stack.  detached from it's parent.</p><p>Example  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'.if'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToIfPHP">tagToIfPHP</a><span class="src-sym">(</span><span class="src-str">'$foo&nbsp;==&nbsp;1'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>Source  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'if'</span>&gt;&lt;<span class="src-id">node1</span>/&gt;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>Result  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$foo&nbsp;</span>==&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span>&lt;node1/&gt;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$code</b>&nbsp;&nbsp;</td>
        <td>Valid PHP condition code</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtagToIfVar"></a>
	<h3>method tagToIfVar <span class="smalllinenumber">[line 5400]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> tagToIfVar(
string
$var)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Replaces selected tag with PHP &quot;if&quot; statement checking if $var evaluates  to TRUE. $var must be available inside template's scope.<br /><br /><p>$var is passed in JavaScript object notation (dot separated).</p><p>Method doesn't change selected nodes stack.  detached from it's parent.</p><p>Notice-safe.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">1</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">2</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;<span class="src-num">3</span>&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'div:eq(1)'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodtagToIfVar">tagToIfVar</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;1&lt;/div&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>2<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;div&gt;3&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">1</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">Text</span>:<span class="src-num">2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-num">3</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodifVar">QueryTemplatesPhpQuery::ifVar()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$var</b>&nbsp;&nbsp;</td>
        <td>Dot-separated object path, eg Object.property.inneProperty</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodunWrap"></a>
	<h3>method unWrap <span class="smalllinenumber">[line 5283]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> unWrap(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Removes selected element and moves it's children into parent node.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToForm"></a>
	<h3>method valuesToForm <span class="smalllinenumber">[line 4209]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToForm(
Array|Object
$values, [String
$selectorPattern = &quot;[name*='%k']&quot;])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Toggles form fields values and selection states according to static values  from $data.<br /><br /><p>This includes: <ul><li>input[type=radio][checked]</li><li>input[type=checkbox][checked]</li><li>select &gt; option[selected]</li><li>input[value]</li><li>textarea</li></ul>  Inputs are selected according to $selectorPattern, where %k represents  variable's key.</p><p>Method doesn't change selected elements stack.</p><p>Example  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'text-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'new'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'checkbox-example'&nbsp;</span>=&gt;&nbsp;<span class="src-id">true</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'radio-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'second'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'select-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'second'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'textarea-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'new'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">valuesToForm</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>Source  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">form</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'text'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'text-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'old'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'checkbox'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'checkbox-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'foo'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'radio'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'radio-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'first'&nbsp;</span><span class="src-id">checked</span>=<span class="src-str">'checked'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'radio'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'radio-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'second'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">select&nbsp;name</span>=<span class="src-str">'select-example'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">option&nbsp;value</span>=<span class="src-str">'first'&nbsp;</span><span class="src-id">selected</span>=<span class="src-str">'selected'</span>&gt;&lt;/<span class="src-id">option</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">option&nbsp;value</span>=<span class="src-str">'second'</span>&gt;&lt;/<span class="src-id">option</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">select</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">textarea&nbsp;name</span>=<span class="src-str">'textarea-example'</span>&gt;<span class="src-id">old</span>&lt;/<span class="src-id">textarea</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">form</span>&gt;</div></li>
</ol></p><p>Result  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">form</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'text'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'text-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'new'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'checkbox'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'checkbox-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'foo'&nbsp;</span><span class="src-id">checked</span>=<span class="src-str">'checked'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'radio'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'radio-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'first'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'radio'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'radio-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'second'&nbsp;</span><span class="src-id">checked</span>=<span class="src-str">'checked'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">select&nbsp;name</span>=<span class="src-str">'select-example'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">option&nbsp;value</span>=<span class="src-str">'first'</span>&gt;&lt;/<span class="src-id">option</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">option&nbsp;value</span>=<span class="src-str">'second'&nbsp;</span><span class="src-id">selected</span>=<span class="src-str">'selected'</span>&gt;&lt;/<span class="src-id">option</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">select</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">textarea&nbsp;name</span>=<span class="src-str">'textarea-example'</span>&gt;<span class="src-key">new</span>&lt;/<span class="src-id">textarea</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">form</span>&gt;</div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching form fields.  Defaults to &quot;[name*='%k']&quot;, which matches fields containing  $values' key in their names. For example, to match only names starting with  &quot;foo[bar]&quot; change $selectorPattern to &quot;[name^='foo[bar]'][name*='%k']&quot;</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToLoop"></a>
	<h3>method valuesToLoop <span class="smalllinenumber">[line 3906]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToLoop(
Array|Object
$values, $rowCallback
$rowCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Method loops provided $values on actually selected nodes. Each time new row  is inserted, provided callback is triggered with $dataRow, $node and $dataIndex.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>This example requires PHP 5.3. For versions before, degradate closures to normal functions.</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'row'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'name'</span>&gt;&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">ul&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'tags'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'tag'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'tag'</span>&gt;&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tag'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'php'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tag'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'js'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'bar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tag'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'perl'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'fooBar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tag'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'php'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tag'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'js'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'tag'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'perl'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">-&gt;</span><a href="../phpQuery/phpQueryObject.html#methodfind">find</a><span class="src-sym">(</span><span class="src-str">'&gt;&nbsp;ul&nbsp;&gt;&nbsp;li'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoop">valuesToLoop</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-key">function</span><span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">,&nbsp;</span><span class="src-var">$li1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$li1</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">valuesToSelector</a><span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'User'</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-str">'span.%k'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">-&gt;</span><a href="../phpQuery/phpQueryObject.html#methodfind">find</a><span class="src-sym">(</span><span class="src-str">'&gt;&nbsp;ul&nbsp;&gt;&nbsp;li'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoop">valuesToLoop</a><span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'Tags'</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-key">function</span><span class="src-sym">(</span><span class="src-var">$tag</span><span class="src-sym">,&nbsp;</span><span class="src-var">$li2</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$li2</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">valuesToSelector</a><span class="src-sym">(</span><span class="src-var">$tag</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;row&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;name&quot;</span>&gt;<span class="src-id">foo</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">ul&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tags&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;<span class="src-id">php</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;<span class="src-id">js</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;row&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;name&quot;</span>&gt;<span class="src-id">bar</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">ul&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tags&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;<span class="src-id">perl</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;row&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;name&quot;</span>&gt;<span class="src-id">fooBar</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">ul&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tags&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;<span class="src-id">php</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;<span class="src-id">js</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;tag&quot;</span>&gt;<span class="src-id">perl</span>&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">ul</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">tag</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">ul</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<a href="../phpQuery/phpQueryObject.html#methodphp">php</a></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">js</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">bar</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">perl</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">fooBar</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<a href="../phpQuery/phpQueryObject.html#methodphp">php</a></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">js</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">perl</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoop">QueryTemplatesPhpQuery::varsToLoop()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object.</td>
      </tr>
          <tr>
        <td class="type">$rowCallback&nbsp;&nbsp;</td>
        <td><b>$rowCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered for every inserted row. Should support following  parameters: <ul><li>$dataRow mixed</li><li>$node phpQueryObject</li><li>$dataIndex mixed</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToLoopFirst"></a>
	<h3>method valuesToLoopFirst <span class="smalllinenumber">[line 3738]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToLoopFirst(
Array|Object
$values, $rowCallback
$rowCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Method loops provided $values on actually selected nodes. Each time new row  is inserted, provided callback is triggered with $dataRow, $node and $dataIndex.<br /><br /><p>Acts as valuesToLoop(), but loops only first node from stack. Rest is removed  from the DOM.</p><p>Method DOES change selected nodes stack. Returned is first node.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoop">QueryTemplatesPhpQuery::valuesToLoop()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object.</td>
      </tr>
          <tr>
        <td class="type">$rowCallback&nbsp;&nbsp;</td>
        <td><b>$rowCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered for every inserted row. Should support following  parameters: <ul><li>$dataRow mixed</li><li>$node phpQueryObject</li><li>$dataIndex mixed</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToLoopSeparate"></a>
	<h3>method valuesToLoopSeparate <span class="smalllinenumber">[line 3712]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToLoopSeparate(
Array|Object
$values, $rowCallback
$rowCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Method loops provided $values on actually selected nodes. Each time new row  is inserted, provided callback is triggered with $dataRow, $node and $dataIndex.<br /><br /><p>Acts as valuesToLoop(), but affects each selected element separately.</p><p>Method doesn't change selected nodes stack.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoop">QueryTemplatesPhpQuery::valuesToLoop()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object.</td>
      </tr>
          <tr>
        <td class="type">$rowCallback&nbsp;&nbsp;</td>
        <td><b>$rowCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered for every inserted row. Should support following  parameters: <ul><li>$dataRow mixed</li><li>$node phpQueryObject</li><li>$dataIndex mixed</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelector"></a>
	<h3>method valuesToSelector <span class="smalllinenumber">[line 2964]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelector(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) into nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">valuesToSelector</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">QueryTemplatesPhpQuery::valuesToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorAfter"></a>
	<h3>method valuesToSelectorAfter <span class="smalllinenumber">[line 3208]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorAfter(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) after nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorAfter">valuesToSelectorAfter</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">QueryTemplatesPhpQuery::valuesToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorAppend"></a>
	<h3>method valuesToSelectorAppend <span class="smalllinenumber">[line 3372]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorAppend(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) at the end of  nodes matched by selector. Method uses actually matched nodes as root  for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorAppend">valuesToSelectorAppend</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">QueryTemplatesPhpQuery::valuesToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorAttr"></a>
	<h3>method valuesToSelectorAttr <span class="smalllinenumber">[line 3455]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorAttr(
String
$attr, Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) as attribute of  nodes matched by selector. Method uses actually matched nodes as root  for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorAttr">valuesToSelectorAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;&nbsp;</span><span class="src-id">rel</span>=<span class="src-str">&quot;&amp;lt;foo/&amp;gt;&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;&nbsp;</span><span class="src-id">rel</span>=<span class="src-str">&quot;&amp;lt;bar/&amp;gt;&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">QueryTemplatesPhpQuery::valuesToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorBefore"></a>
	<h3>method valuesToSelectorBefore <span class="smalllinenumber">[line 3124]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorBefore(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) before nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorBefore">valuesToSelectorBefore</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">QueryTemplatesPhpQuery::valuesToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorPrepend"></a>
	<h3>method valuesToSelectorPrepend <span class="smalllinenumber">[line 3290]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorPrepend(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) at the beggining of  nodes matched by selector. Method uses actually matched nodes as root  for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorPrepend">valuesToSelectorPrepend</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field1&quot;</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">&quot;field2&quot;</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">QueryTemplatesPhpQuery::valuesToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToSelectorReplace"></a>
	<h3>method valuesToSelectorReplace <span class="smalllinenumber">[line 3042]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> valuesToSelectorReplace(
Array|Object
$values, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) replacing nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field1'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'field2'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'&lt;bar/&gt;'</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelectorReplace">valuesToSelectorReplace</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">QueryTemplatesPhpQuery::valuesToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of fields from $values which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToStack"></a>
	<h3>method valuesToStack <span class="smalllinenumber">[line 4806]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToStack(
Array|Object
$values, [
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) inside actually  selected nodes.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStack">valuesToStack</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">QueryTemplatesPhpQuery::valuesToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToStackAfter"></a>
	<h3>method valuesToStackAfter <span class="smalllinenumber">[line 5015]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToStackAfter(
Array|Object
$values, [
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) inside actually  selected nodes.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackAfter">valuesToStackAfter</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">QueryTemplatesPhpQuery::valuesToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToStackAppend"></a>
	<h3>method valuesToStackAppend <span class="smalllinenumber">[line 5157]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToStackAppend(
Array|Object
$values, [
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) inside actually  selected nodes.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackAppend">valuesToStackAppend</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">QueryTemplatesPhpQuery::valuesToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToStackAttr"></a>
	<h3>method valuesToStackAttr <span class="smalllinenumber">[line 5229]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToStackAttr(
String
$attr, Array|Object
$values, [
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) inside actually  selected nodes.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackAttr">valuesToStackAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1&nbsp;rel</span>=<span class="src-str">&quot;&amp;lt;foo/&amp;gt;&quot;</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node1&nbsp;rel</span>=<span class="src-str">&quot;&amp;lt;bar/&amp;gt;&quot;</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">QueryTemplatesPhpQuery::valuesToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToStackBefore"></a>
	<h3>method valuesToStackBefore <span class="smalllinenumber">[line 4944]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToStackBefore(
Array|Object
$values, [
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) inside actually  selected nodes.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackBefore">valuesToStackBefore</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">QueryTemplatesPhpQuery::valuesToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToStackPrepend"></a>
	<h3>method valuesToStackPrepend <span class="smalllinenumber">[line 5086]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToStackPrepend(
Array|Object
$values, [
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) inside actually  selected nodes.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackPrepend">valuesToStackPrepend</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;&lt;<span class="src-id">node1</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">bar</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">QueryTemplatesPhpQuery::valuesToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToStackReplace"></a>
	<h3>method valuesToStackReplace <span class="smalllinenumber">[line 4873]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> valuesToStackReplace(
Array|Object
$values, [
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects markup from $values' content (rows or attributes) inside actually  selected nodes.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToStackReplace">valuesToStackReplace</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">foo</span>&gt;&lt;/<span class="src-id">foo</span>&gt;&lt;<span class="src-id">bar</span>&gt;&lt;/<span class="src-id">bar</span>&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">foo</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">bar</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToSelector">QueryTemplatesPhpQuery::valuesToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td>Associative array or Object containing markup, text or instance of Callback.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvaluesToVars"></a>
	<h3>method valuesToVars <span class="smalllinenumber">[line 4737]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void valuesToVars(

$varsArray)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>deprecated:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varsArray</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrint"></a>
	<h3>method varPrint <span class="smalllinenumber">[line 69]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrint(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName as matched elements' content.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrint">varPrint</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintAfter"></a>
	<h3>method varPrintAfter <span class="smalllinenumber">[line 248]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintAfter(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName after matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintAfter">varPrintAfter</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintAppend"></a>
	<h3>method varPrintAppend <span class="smalllinenumber">[line 368]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintAppend(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName on the end of matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintAppend">varPrintAppend</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;FOO<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintAttr"></a>
	<h3>method varPrintAttr <span class="smalllinenumber">[line 450]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintAttr(
String
$attr, String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName as attribute $attr of matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintAttr">varPrintAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&nbsp;data.foo.bar.0=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintBefore"></a>
	<h3>method varPrintBefore <span class="smalllinenumber">[line 187]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintBefore(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName before matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintBefore">varPrintBefore</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&gt;FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintPrepend"></a>
	<h3>method varPrintPrepend <span class="smalllinenumber">[line 308]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintPrepend(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName on beggining of matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintPrepend">varPrintPrepend</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>FOO&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarPrintReplace"></a>
	<h3>method varPrintReplace <span class="smalllinenumber">[line 127]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varPrintReplace(
String
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Prints variable $varName replacing matched elements.<br /><br /><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">div</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">p</span>&gt;<span class="src-id">FOO</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">div</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'foo'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'bar'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'printMe'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'p'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarPrintReplace">varPrintReplace</a><span class="src-sym">(</span><span class="src-str">'data.foo.bar.0'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;div&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'foo'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'bar'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'0'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'foo'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'bar'</span><span class="src-sym">}</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'0'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/div&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">p</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">FOO</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">div</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsFromStack"></a>
	<h3>method varsFromStack <span class="smalllinenumber">[line 6268]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void varsFromStack(
String
$name)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Saves markupOuter() as value of variable $var avaible in template scope.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>support second $method param</td>
  </tr>
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>user self::parent for storing vars</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$name</b>&nbsp;&nbsp;</td>
        <td>New variable name.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsFromStackText"></a>
	<h3>method varsFromStackText <span class="smalllinenumber">[line 6289]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void varsFromStackText(
String
$name)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Saves text() as value of variable $var avaible in template scope.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>user self::parent for storing vars</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$name</b>&nbsp;&nbsp;</td>
        <td>New variable name.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsFromValues"></a>
	<h3>method varsFromValues <span class="smalllinenumber">[line 4729]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsFromValues(
array
$varsArray)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Behaves as var_export, dumps variables from $varsArray as $key = value for  later use during template execution. Variables are prepended into selected  elemets.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>&gt;&lt;/<span class="src-id">node2</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$values&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToVars">valuesToVars</a><span class="src-sym">(</span><span class="src-var">$values</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span>$<span class="src-num">0&nbsp;</span>=&nbsp;<span class="src-str">'&lt;foo/&gt;'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;$<span class="src-num">1&nbsp;</span>=&nbsp;<span class="src-str">'&lt;bar/&gt;'</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">array&nbsp;&nbsp;</td>
        <td><b>$varsArray</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToForm"></a>
	<h3>method varsToForm <span class="smalllinenumber">[line 4096]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToForm(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = &quot;[name*='%k']&quot;])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code which toggles form fields values and selection  states according to value of variable $varName.<br /><br /><p>This includes: <ul><li>input[type=radio][checked]</li><li>input[type=checkbox][checked]</li><li>select &gt; option[selected]</li><li>input[value]</li><li>textarea</li></ul>  Inputs are selected according to $selectorPattern, where %k represents  variable's key.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">form</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'input-example'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;name</span>=<span class="src-str">'array[array-example]'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">textarea&nbsp;name</span>=<span class="src-str">'textarea-example'</span>&gt;&lt;/<span class="src-id">textarea</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">select&nbsp;name</span>=<span class="src-str">'select-example'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">option&nbsp;value</span>=<span class="src-str">'first'&nbsp;</span><span class="src-id">selected</span>=<span class="src-str">'selected'</span>&gt;&lt;/<span class="src-id">option</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">select</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'radio'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'radio-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'foo'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">input&nbsp;type</span>=<span class="src-str">'checkbox'&nbsp;</span><span class="src-id">name</span>=<span class="src-str">'checkbox-example'&nbsp;</span><span class="src-id">value</span>=<span class="src-str">'foo'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">form</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'input-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'array-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'textarea-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'select-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'radio-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-str">'checkbox-example'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">varsToForm</a><span class="src-sym">(</span><span class="src-str">'data'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;form&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;input&nbsp;name=&quot;input-example&quot;&nbsp;value=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'input-example'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'input-example'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'input-example'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'input-example'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;input&nbsp;name=&quot;array[array-example]&quot;&nbsp;value=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'array-example'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'array-example'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'array-example'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'array-example'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;textarea&nbsp;name=&quot;textarea-example&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'textarea-example'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'textarea-example'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'textarea-example'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'textarea-example'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/textarea&gt;&lt;select&nbsp;name=&quot;select-example&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'select-example'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'select-example'</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-str">'first'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'select-example'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'select-example'</span><span class="src-sym">}&nbsp;</span>==&nbsp;<span class="src-str">'first'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;option&nbsp;value=&quot;first&quot;&nbsp;selected&gt;&lt;/option&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;option&nbsp;value=&quot;first&quot;&gt;&lt;/option&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/select&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'radio-example'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'radio-example'</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'radio-example'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'radio-example'</span><span class="src-sym">}&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;radio&quot;&nbsp;name=&quot;radio-example&quot;&nbsp;value=&quot;foo&quot;&nbsp;checked&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;radio&quot;&nbsp;name=&quot;radio-example&quot;&nbsp;value=&quot;foo&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'checkbox-example'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'checkbox-example'</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;<span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'checkbox-example'</span><span class="src-sym">}</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$data</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'checkbox-example'</span><span class="src-sym">}&nbsp;</span>==&nbsp;<span class="src-str">'foo'</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;checkbox-example&quot;&nbsp;value=&quot;foo&quot;&nbsp;checked&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;input&nbsp;type=&quot;checkbox&quot;&nbsp;name=&quot;checkbox-example&quot;&nbsp;value=&quot;foo&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/form&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">form</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;input-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;array[array-example]&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">textarea</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;textarea-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">select</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;select-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">option</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;first&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">selected</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;radio-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;checkbox-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">form</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;input-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-id">PHP</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;array[array-example]&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-id">PHP</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">textarea</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;textarea-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">select</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;select-example&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">option</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;first&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">selected</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">option</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;first&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;radio-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">checked</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;radio-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;checkbox-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">checked</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">input</span><span class="src-sym">[</span><span class="src-id">name</span>=<span class="src-str">&quot;checkbox-example&quot;</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-id">value</span>=<span class="src-str">&quot;foo&quot;</span><span class="src-sym">]</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToForm">QueryTemplatesPhpQuery::valuesToForm()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodformFromVars">QueryTemplatesPhpQuery::formFromVars()</a></td>
  </tr>
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>support select[multiple] (thou array)</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching form fields.  Defaults to &quot;[name*='%k']&quot;, which matches fields containing variable's key in  their names. For example, to match only names starting with &quot;foo[bar]&quot; change  $selectorPattern to &quot;[name^='foo[bar]'][name*='%k']&quot;</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToLoop"></a>
	<h3>method varsToLoop <span class="smalllinenumber">[line 3604]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToLoop(
String
$varName, String
$rowName, [String
$indexName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected elements with executable code iterating $varName as $rowName.<br /><br /><p>Method doesn't change selected nodes stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'row'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'name'</span>&gt;&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">ul&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'tags'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">li&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'tag'</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">span&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'name'</span>&gt;&lt;/<span class="src-id">span</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="src-id">li</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">ul</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'foo'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'php'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'js'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'bar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'perl'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'User'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'fooBar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'Tags'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'php'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'js'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'perl'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$userFields&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$tagFields&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../phpQuery/phpQueryObject.html#methodfind">find</a><span class="src-sym">(</span><span class="src-str">'&gt;&nbsp;ul&nbsp;&gt;&nbsp;li'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoop">varsToLoop</a><span class="src-sym">(</span><span class="src-str">'data'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'row'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">varsToSelector</a><span class="src-sym">(</span><span class="src-str">'row'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$userFields</span><span class="src-sym">,&nbsp;</span><span class="src-str">'span.%k'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../phpQuery/phpQueryObject.html#methodfind">find</a><span class="src-sym">(</span><span class="src-str">'&gt;&nbsp;ul&nbsp;&gt;&nbsp;li'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoop">varsToLoop</a><span class="src-sym">(</span><span class="src-str">'row.Tags'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'tag'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">varsToSelector</a><span class="src-sym">(</span><span class="src-str">'tag'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$tagFields</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;ul&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span>||&nbsp;<a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)))&nbsp;</span><span class="src-sym">{&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$data&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$row</span><span class="src-sym">)</span>:&nbsp;&nbsp;<span class="src-php">?&gt;</span>&lt;li&nbsp;class=&quot;row&quot;&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span&nbsp;class=&quot;name&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/span&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul&nbsp;class=&quot;tags&quot;&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'Tags'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-var">$__8daca&nbsp;</span>=&nbsp;<span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">'Tags'</span><span class="src-sym">]</span><span class="src-sym">;&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'Tags'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span><span class="src-var">$__8daca&nbsp;</span>=&nbsp;<span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'Tags'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$__8daca</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$__8daca</span><span class="src-sym">)&nbsp;</span>||&nbsp;<a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$__8daca</span><span class="src-sym">)))&nbsp;</span><span class="src-sym">{&nbsp;</span><span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$__8daca&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$tag</span><span class="src-sym">)</span>:&nbsp;&nbsp;<span class="src-php">?&gt;</span>&lt;li&nbsp;class=&quot;tag&quot;&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span&nbsp;class=&quot;name&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$tag</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$tag</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$tag</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$tag</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'name'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/span&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">endforeach</span><span class="src-sym">;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/li&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">endforeach</span><span class="src-sym">;&nbsp;</span><span class="src-sym">}&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;/ul&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">ul</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">ul</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">row</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">ul</span>.<span class="src-id">tags</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">li</span>.<span class="src-id">tag</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">span</span>.<span class="src-id">name</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvaluesToLoop">QueryTemplatesPhpQuery::valuesToLoop()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable which will be looped. Must contain $ at the beggining.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$rowName</b>&nbsp;&nbsp;</td>
        <td>Name of variable being result of iteration.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$indexName</b>&nbsp;&nbsp;</td>
        <td>Optional. Use it when you want to have $varName's key available in the scope.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToLoopFirst"></a>
	<h3>method varsToLoopFirst <span class="smalllinenumber">[line 3656]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToLoopFirst(
String
$varName, String
$rowName, [String
$indexName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected elements with executable code iterating $varName as $rowName.<br /><br /><p>Acts as varsToLoop(), but loops only first node from stack. Rest is removed  from the DOM.</p><p>Method DOES change selected nodes stack. Returned is first node.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoop">QueryTemplatesPhpQuery::varsToLoop()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable which will be looped. Must contain $ at the beggining.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$rowName</b>&nbsp;&nbsp;</td>
        <td>Name of variable being result of iteration.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$indexName</b>&nbsp;&nbsp;</td>
        <td>Optional. Use it when you want to have $varName's key available in the scope.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToLoopSeparate"></a>
	<h3>method varsToLoopSeparate <span class="smalllinenumber">[line 3626]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToLoopSeparate(
String
$varName, String
$rowName, [String
$indexName = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Wraps selected elements with executable code iterating $varName as $rowName.<br /><br /><p>Acts as varsToLoop(), but affects each selected element separately.</p><p>Method doesn't change selected nodes stack.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToLoop">QueryTemplatesPhpQuery::varsToLoop()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable which will be looped. Must contain $ at the beggining.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$rowName</b>&nbsp;&nbsp;</td>
        <td>Name of variable being result of iteration.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$indexName</b>&nbsp;&nbsp;</td>
        <td>Optional. Use it when you want to have $varName's key available in the scope.</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelector"></a>
	<h3>method varsToSelector <span class="smalllinenumber">[line 534]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelector(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields inside nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">varsToSelector</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorAfter"></a>
	<h3>method varsToSelectorAfter <span class="smalllinenumber">[line 878]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorAfter(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields after nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorAfter">varsToSelectorAfter</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorAppend"></a>
	<h3>method varsToSelectorAppend <span class="smalllinenumber">[line 703]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorAppend(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the end of nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorAppend">varsToSelectorAppend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorAttr"></a>
	<h3>method varsToSelectorAttr <span class="smalllinenumber">[line 1052]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorAttr(
String
$attr, String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields as attribute of nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorAttr">varsToSelectorAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorBefore"></a>
	<h3>method varsToSelectorBefore <span class="smalllinenumber">[line 964]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorBefore(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields before nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorBefore">varsToSelectorBefore</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&nbsp;class=&quot;field1&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;p&nbsp;class=&quot;field2&quot;&gt;lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorPrepend"></a>
	<h3>method varsToSelectorPrepend <span class="smalllinenumber">[line 790]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorPrepend(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the beggining of nodes  matched by selector. Method uses actually matched nodes as root for the  query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorPrepend">varsToSelectorPrepend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field1&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>lorem&nbsp;ipsum&lt;/p&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;p&nbsp;class=&quot;field2&quot;&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>lorem&nbsp;ipsum&lt;/p&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  variables key (field).  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToSelectorReplace"></a>
	<h3>method varsToSelectorReplace <span class="smalllinenumber">[line 616]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a>|<a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a> varsToSelectorReplace(
String
$varName, Array|Object
$varFields, [String
$selectorPattern = '.%k'], [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields replacing nodes matched by  selector. Method uses actually matched nodes as root for the query.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field1'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">p&nbsp;</span><span class="src-key">class</span>=<span class="src-str">'field2'</span>&gt;<span class="src-id">lorem&nbsp;ipsum</span>&lt;/<span class="src-id">p</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field1&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">field2&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelectorReplace">varsToSelectorReplace</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field1'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field1'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'field2'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'field2'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">p</span>.<span class="src-id">field2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">Text</span>:<span class="src-id">lorem&nbsp;ipsum</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">QueryTemplatesPhpQuery::varsToStack()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td>Defines pattern matching target nodes. %k represents key.  Defaults to &quot;.%k&quot;, which matches nodes with class name equivalent to  data source key.  For example, to restrict match to nodes with additional class &quot;foo&quot; change  $selectorPattern to &quot;.foo.%k&quot;</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStack"></a>
	<h3>method varsToStack <span class="smalllinenumber">[line 1180]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToStack(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields inside actually matched  nodes. Second param needs to be wrapped with array_keys for non-assosiative  arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStack">varsToStack</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">QueryTemplatesPhpQuery::varsToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackAfter"></a>
	<h3>method varsToStackAfter <span class="smalllinenumber">[line 1524]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToStackAfter(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields after actually matched  nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackAfter">varsToStackAfter</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">QueryTemplatesPhpQuery::varsToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackAppend"></a>
	<h3>method varsToStackAppend <span class="smalllinenumber">[line 1350]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToStackAppend(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the end of actually  matched nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackAppend">varsToStackAppend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">QueryTemplatesPhpQuery::varsToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackAttr"></a>
	<h3>method varsToStackAttr <span class="smalllinenumber">[line 1699]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToStackAttr(
String
$attr, String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields as attribute of actually  matched nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackAttr">varsToStackAttr</a><span class="src-sym">(</span><span class="src-str">'rel'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&nbsp;rel=&quot;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&quot;&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">QueryTemplatesPhpQuery::varsToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$attr</b>&nbsp;&nbsp;</td>
        <td>Target attribute name.</td>
      </tr>
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackBefore"></a>
	<h3>method varsToStackBefore <span class="smalllinenumber">[line 1611]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToStackBefore(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields before actually matched  nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackBefore">varsToStackBefore</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">QueryTemplatesPhpQuery::varsToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackPrepend"></a>
	<h3>method varsToStackPrepend <span class="smalllinenumber">[line 1437]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToStackPrepend(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields at the beggining of actually  matched nodes. Second param needs to be wrapped with array_keys for  non-assosiative arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackPrepend">varsToStackPrepend</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;&lt;node2&gt;&lt;/node2&gt;&lt;node1&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;&lt;/node1&gt;</div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">QueryTemplatesPhpQuery::varsToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodvarsToStackReplace"></a>
	<h3>method varsToStackReplace <span class="smalllinenumber">[line 1263]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code><a href="../QueryTemplates/QueryTemplatesParse.html">QueryTemplatesParse</a>|<a href="../QueryTemplates/QueryTemplatesPhpQuery.html">QueryTemplatesPhpQuery</a> varsToStackReplace(
String
$varName, Array|Object
$varFields, [Array
$skipFields = null], [Callback|string
$fieldCallback = null])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Injects executable code printing variable's fields replacing actually matched  nodes. Second param needs to be wrapped with array_keys for non-assosiative  arrays.<br /><br /><p>Method doesn't change selected elements stack.</p><p>== Example ==</p><p>=== Markup ===  <ol><li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;<span class="src-id">node1</span>&gt;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&lt;<span class="src-id">node2</span>/&gt;</div></li>
<li><div class="src-line">&nbsp;&lt;/<span class="src-id">node1</span>&gt;</div></li>
</ol></p><p>=== Data ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$foo&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">first&nbsp;</span>=&nbsp;<span class="src-str">'foo'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-id">second&nbsp;</span>=&nbsp;<span class="src-str">'bar'</span><span class="src-sym">;</span></div></li>
</ol></p><p>=== `QueryTemplates` formula ===  <ol><li><div class="src-line">&nbsp;<span class="src-var">$template</span><span class="src-sym">[</span><span class="src-str">'node1'</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToStackReplace">varsToStackReplace</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$foo</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">;</span></div></li>
</ol></p><p>=== Template ===  <ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'first'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'first'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span>&lt;node2&gt;&lt;/node2&gt;<span class="src-php">&lt;?php&nbsp;&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">[</span><span class="src-str">'second'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">))&nbsp;</span>print&nbsp;<span class="src-var">$foo</span><span class="src-sym">-&gt;</span><span class="src-sym">{</span><span class="src-str">'second'</span><span class="src-sym">}</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-php">?&gt;</span></div></li>
</ol></p><p>=== Template tree before ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node1</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;-&nbsp;<span class="src-id">node2</span></div></li>
</ol></p><p>=== Template tree after ===  <ol><li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">node2</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id">PHP</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToSelector">QueryTemplatesPhpQuery::varsToSelector()</a></td>
  </tr>
  <tr>
    <td><b>see:</b>&nbsp;&nbsp;</td><td><a href="../QueryTemplates/QueryTemplatesPhpQuery.html#methodvarsToForm">QueryTemplatesPhpQuery::varsToForm()</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">String&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td>Variable avaible in scope of type Array or Object.  $varName should NOT start with $.</td>
      </tr>
          <tr>
        <td class="type">Array|Object&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td>Variable value with all fields (keys) OR array of variable fields (keys).  Param needs to be passed thou array_keys for non-assosiative arrays.</td>
      </tr>
          <tr>
        <td class="type">Array&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td>Array of keys from $varValue which should be skipped.</td>
      </tr>
          <tr>
        <td class="type">Callback|string&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td>Callback triggered after every insertion. Three parameters are passed to  this callback: <ul><li>$node phpQueryObject</li><li>$field String</li><li>$target String|array</li></ul></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_codeToSelector"></a>
	<h3>method _codeToSelector <span class="smalllinenumber">[line 2305]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _codeToSelector(

$target, 
$codeArray, 
$selectorPattern, 
$skipFields, 
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_codeToStack"></a>
	<h3>method _codeToStack <span class="smalllinenumber">[line 2862]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _codeToStack(

$target, 
$codeArray, 
$selectorPattern, 
$skipFields, 
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$codeArray</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_if"></a>
	<h3>method _if <span class="smalllinenumber">[line 5752]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _if(

$lang, 
$code, [
$separate = false])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$lang</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$code</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$separate</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_tagToElse"></a>
	<h3>method _tagToElse <span class="smalllinenumber">[line 5703]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _tagToElse(

$lang)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$lang</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_valuesToLoop"></a>
	<h3>method _valuesToLoop <span class="smalllinenumber">[line 3909]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _valuesToLoop(

$pq, 
$values, 
$rowCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$pq</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$values</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$rowCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_valuesToSelector"></a>
	<h3>method _valuesToSelector <span class="smalllinenumber">[line 3458]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _valuesToSelector(

$target, 
$data, 
$selectorPattern, 
$skipFields, 
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$data</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_valuesToStack"></a>
	<h3>method _valuesToStack <span class="smalllinenumber">[line 5232]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _valuesToStack(

$target, 
$data, 
$skipFields, 
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$data</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varPrint"></a>
	<h3>method _varPrint <span class="smalllinenumber">[line 371]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varPrint(

$target, 
$varName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsParseFields"></a>
	<h3>method _varsParseFields <span class="smalllinenumber">[line 1732]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varsParseFields(

$varFields)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsToLoop"></a>
	<h3>method _varsToLoop <span class="smalllinenumber">[line 3631]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varsToLoop(

$pq, 
$varName, 
$asVarName, 
$keyName)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$pq</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$asVarName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$keyName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsToSelector"></a>
	<h3>method _varsToSelector <span class="smalllinenumber">[line 1068]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>unknown_type _varsToSelector(
$target
$target, $varName
$varName, $varFields
$varFields, $selectorPattern
$selectorPattern, $skipFields
$skipFields, $fieldCallback
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Internal method.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>TODO:</b>&nbsp;&nbsp;</td><td>support $varName to be a function (last char == ')'),</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">$target&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$varName&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$varFields&nbsp;&nbsp;</td>
        <td><b>$varFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$selectorPattern&nbsp;&nbsp;</td>
        <td><b>$selectorPattern</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$skipFields&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">$fieldCallback&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="method_varsToStack"></a>
	<h3>method _varsToStack <span class="smalllinenumber">[line 1702]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void _varsToStack(

$target, 
$varName, 
$varValue, 
$skipFields, 
$fieldCallback)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$target</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varName</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$varValue</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$skipFields</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$fieldCallback</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Thu, 26 Feb 2009 14:23:29 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>